import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/views/Login'
import Layout from '@/views/Layout'
import Home from '@/views/Home'
import Mine from '@/views/Mine'
import FindRoom from '@/views/FindRoom'
import Information from '@/views/Information'
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    redirect: '/layout'
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/layout',
    component: Layout,
    redirect: '/layout/home',
    children: [
      {
        path: 'home',
        component: Home
      },
      {
        path: 'mine',
        component: Mine
      },
      {
        path: 'findroom',
        component: FindRoom
      },
      {
        path: 'information',
        component: Information
      }
    ]

  }

]

const router = new VueRouter({
  routes
})

export default router
